/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 涛
 * Date: 2023-09-21
 * Time: 22:04
 */
class MyArray1<T> {
    public T[] array = (T[])new Object[10];
    public T getPos(int pos) {
        return this.array[pos];
    }
    public void setPos(int pos, T val) {
        this.array[pos] = val;
    }
    public T[] getArray() {
        return array;
    }
}

public class Test4 {
    public static void main(String[] args) {
        MyArray1<Integer> myArray1 = new MyArray1<>();
        Integer[] strings = myArray1.getArray();
    }
    public static void main1(String[] args) {
        MyArray1<Integer> myArray1 = new MyArray1<>();
        myArray1.setPos(0, 12);
        int ret = myArray1.getPos(0);
        System.out.println(ret);
        MyArray1<String> myArray2 = new MyArray1<>();
        myArray2.setPos(0, "hello bit");
        String ret1 = myArray2.getPos(0);
        System.out.println(ret1);

    }
}
